Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore[test]: add test for address members' names as struct fields #3527

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

tserg
Copy link
Collaborator

@tserg tserg commented Jul 20, 2023

What I did

Fix #3521.

How I did it

Remove the else branch in parse_Attribute so that structs can be catched.

How to verify it

See test.

Commit message

fix: allow address members' names as struct fields

Description for the changelog

Allow address members' names as struct fields.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.14%. Comparing base (cd31867) to head (a321575).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3527      +/-   ##
==========================================
+ Coverage   92.12%   92.14%   +0.02%     
==========================================
  Files         119      119              
  Lines       16962    16962              
  Branches     2872     2872              
==========================================
+ Hits        15626    15630       +4     
  Misses        919      919              
+ Partials      417      413       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@charles-cooper
Copy link
Member

i think reserving those attributes to not be available on structs/enums is kind of ok.

@charles-cooper
Copy link
Member

but yea, maybe it's useful sometimes to have structs with information like some_user.balance, some_user.codesize etc

@charles-cooper
Copy link
Member

@tserg the original issue was fixed in 7bdebbf, but it would be good to get these tests in. could you please isolate this PR to update the tests?

@tserg tserg changed the title fix: allow address members' names as struct fields chore[test]: add test for address members' names as struct fields Dec 30, 2024
@tserg tserg requested a review from charles-cooper December 31, 2024 05:20
@charles-cooper
Copy link
Member

@tserg could you update to the new kwarg syntax?

@tserg
Copy link
Collaborator Author

tserg commented Feb 20, 2025

Done!

Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tagging @cyberthirst to check as well

@charles-cooper charles-cooper self-assigned this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: TypeCheckFailure when using address and self members as struct field name
3 participants